package com.deductive.domain.wq;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 推演指令表
 * @TableName disposition_wq_tyzl
 */
@TableName(value ="disposition_wq_tyzl")
@Data
public class DispositionWqTyzl implements Serializable {
    /**
     * id
     */
    @TableId(value = "id",type= IdType.AUTO)
    private Integer id;

    /**
     * 指令类型
     */
    @TableField(value = "instruction_type")
    private String instructionType;

    /**
     * 指令内容
     */
    @TableField(value = "instruction_content")
    private String instructionContent;

    /**
     * 指令对象
     */
    @TableField(value = "instruction_target")
    private String instructionTarget;

    /**
     * 指令执行时间
     */
    @TableField(value = "instruction_execution_time")
    private String instructionExecutionTime;

    /**
     * 关联的推演工程
     */
    @TableField(value = "deductive_engineering")
    private String deductiveEngineering;

    /**
     * 关联的席位
     */
    @TableField(value = "seat")
    private String seat;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DispositionWqTyzl other = (DispositionWqTyzl) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getInstructionType() == null ? other.getInstructionType() == null : this.getInstructionType().equals(other.getInstructionType()))
            && (this.getInstructionContent() == null ? other.getInstructionContent() == null : this.getInstructionContent().equals(other.getInstructionContent()))
            && (this.getInstructionTarget() == null ? other.getInstructionTarget() == null : this.getInstructionTarget().equals(other.getInstructionTarget()))
            && (this.getInstructionExecutionTime() == null ? other.getInstructionExecutionTime() == null : this.getInstructionExecutionTime().equals(other.getInstructionExecutionTime()))
            && (this.getDeductiveEngineering() == null ? other.getDeductiveEngineering() == null : this.getDeductiveEngineering().equals(other.getDeductiveEngineering()))
            && (this.getSeat() == null ? other.getSeat() == null : this.getSeat().equals(other.getSeat()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getInstructionType() == null) ? 0 : getInstructionType().hashCode());
        result = prime * result + ((getInstructionContent() == null) ? 0 : getInstructionContent().hashCode());
        result = prime * result + ((getInstructionTarget() == null) ? 0 : getInstructionTarget().hashCode());
        result = prime * result + ((getInstructionExecutionTime() == null) ? 0 : getInstructionExecutionTime().hashCode());
        result = prime * result + ((getDeductiveEngineering() == null) ? 0 : getDeductiveEngineering().hashCode());
        result = prime * result + ((getSeat() == null) ? 0 : getSeat().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", instructionType=").append(instructionType);
        sb.append(", instructionContent=").append(instructionContent);
        sb.append(", instructionTarget=").append(instructionTarget);
        sb.append(", instructionExecutionTime=").append(instructionExecutionTime);
        sb.append(", deductiveEngineering=").append(deductiveEngineering);
        sb.append(", seat=").append(seat);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}